package org.example.jiaxiao.service.impl;

import org.example.jiaxiao.entity.Course;
import org.example.jiaxiao.mapper.ManageMapper;
import org.example.jiaxiao.service.ManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ManageServiceImpl implements ManageService {
    @Autowired
    private ManageMapper manageMapper;

    // 实现添加课程信息的方法
    @Override
    public int addCourseInformation(Course course) {

        //生成一个随机数
        course.setCourseId((int) (Math.random() * 1000));
        return manageMapper.addCounserInformation(course);
    }

//    // 实现更新课程信息的方法
//    @Override
//    public int updateCourseInformation(Course course) {
//        return manageMapper.updateCourse(course);
//    }
}
